package com.bobi.tfca.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 审核类别的具体子类，为了方便，没有采用更复杂的表设计
 * @author 李文发
 * @date 2024/4/20
 */
@Getter
@AllArgsConstructor
public enum SubAuditItemTypeEnum {

    /**
     * 入会申请
     */
    REGISTER_APPLY(0, "入会申请"),
    /**
     * 退会申请
     */
    QUIT_ASS_APPLY(1, "退会申请");

    private final Integer code;
    private final String desc;

    public static SubAuditItemTypeEnum getAuditType(Integer subType) {
        for (SubAuditItemTypeEnum value : values()) {
            if (value.getCode() == subType) {
                return value;
            }
        }
        return null;
    }
}
